﻿<UserControl x:Class="SpeakupUI2.FilterPanel"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             Name="RootControl">
    <Expander Name="Expander" IsExpanded="True">
        <Expander.Header>
                <CheckBox Name="UseManualFilterCheckbox"
                          IsChecked="{Binding ElementName=RootControl,Path=UseManualFilter}"
                          Checked="UseManualFilterCheckbox_Checked">
                    Use Manual Filter
                </CheckBox>
        </Expander.Header>
        <GroupBox>
            <StackPanel HorizontalAlignment="Center">
                <StackPanel.Resources>
                    <Style TargetType="CheckBox">
                        <Setter Property="CheckBox.Margin" Value="0 3 0 0" />                        
                        <Setter Property="CheckBox.IsEnabled" 
                                Value="{Binding ElementName=UseManualFilterCheckbox, Path=IsChecked}" />
                    </Style>
                </StackPanel.Resources>
                <CheckBox Name="ClubCheckbox" 
                          IsChecked="{Binding ElementName=RootControl,Path=HighlightClub}">
                    Club
                </CheckBox>
                <CheckBox Name="GroupCheckbox"
                          IsChecked="{Binding ElementName=RootControl,Path=HighlightGroup}">
                    Group Class
                </CheckBox>
                <CheckBox Name="GrammarCheckbox"
                          IsChecked="{Binding ElementName=RootControl,Path=HighlightGrammar}">
                    Grammar
                </CheckBox>
                <CheckBox Name="ReadingCheckbox"
                          IsChecked="{Binding ElementName=RootControl,Path=HighlightReading}">
                    Reading
                </CheckBox>
                <CheckBox Name="WritingCheckbox"
                          IsChecked="{Binding ElementName=RootControl,Path=HighlightWriting}">
                    Writing
                </CheckBox>
                <CheckBox Name="ConversationCheckbox"
                          IsChecked="{Binding ElementName=RootControl,Path=HighlightConversation}">            
                    Converstation
                </CheckBox>
            </StackPanel>
        </GroupBox>
    </Expander>
</UserControl>
